// Copyright 2020 Red Hat, Inc. and/or its affiliates
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package flag

import (
	"github.com/spf13/cobra"
)

// ArtifactFlags is common properties used to configure Artifact
type ArtifactFlags struct {
	ProjectGroupID    string
	ProjectArtifactID string
	ProjectVersion    string
}

// AddArtifactFlags adds the Artifact flags to the given command
func AddArtifactFlags(command *cobra.Command, flags *ArtifactFlags) {
	command.Flags().StringVar(&flags.ProjectGroupID, "project-group-id", "", "Indicates the unique identifier of the organization or group that created the project, e.g: 'com.company'")
	command.Flags().StringVar(&flags.ProjectArtifactID, "project-artifact-id", "", "Indicates the unique base name of the primary artifact being generated, e.g: 'project'")
	command.Flags().StringVar(&flags.ProjectVersion, "project-version", "", "Indicates the version of the artifact generated by the project, e.g: '1.0-SNAPSHOT'")
}

// CheckArtifactArgs validates the ArtifactFlags flags
func CheckArtifactArgs(_ *ArtifactFlags) error {
	return nil
}
